home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group98a.txt
/
000149_icon-group-sender _Fri Mar 27 17:01:09 1998.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
2KB
Return-Path: <icon-group-sender>
Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
by baskerville.CS.Arizona.EDU (8.8.8/8.8.7) with SMTP id RAA16084
for <icon-group-addresses@baskerville.CS.Arizona.EDU>; Fri, 27 Mar 1998 17:01:08 -0700 (MST)
Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
id AA32062; Fri, 27 Mar 1998 17:01:07 -0700
X-Sender: clodius@nis-pop.lanl.gov
Message-Id: <v04003a03b141ae238dd4@[128.165.58.113]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Date: Fri, 27 Mar 1998 13:49:55 -0600
To: icon-group@optima.CS.Arizona.EDU
From: "William B. Clodius" <wclodius@lanl.gov>
Subject: Icon and recursion
Errors-To: icon-group-errors@optima.CS.Arizona.EDU
Status: RO
Content-Length: 1618
Hi:
I have been trying to learn a little of Icon from information available
over the net, and have been having trouble trying to transcribe some code
from other languages to Icon. I have, so far, not had any problems
translating procedural style code. The troublesome code has been primarilly
Lisp or Lisp style benchmarks that rely heavily on recursion, i.e. the Tak
benchmark and the change benchmark
(http://www.webcom.com/nazgul/change.html). The Tak bencghmark appears to
exhaust the internal stack before printing any output. Given the nature of
the Tak benchmark I may not be able to do something to make it work. The
Change benchmark, gives incorrect output and inserted write statements
suggest an order of execution that I do not understand at all.
As a result I have the following questions:
1. What are the semantics of Icon's argument passing mechanism, i.e., by
value, by reference, copy-in/copy-out, no modifiable aliasing, by name,
lazy, eager?
2. What is the meaning of the "local" statement, i.e., does it ensure that
a value is saved from call to call?
3. Can Icon handle recursion, and are there any tricks I should be aware of
either to make recursion work or translate recursive code into a form Icon
can handle? (Note Tak and Change are not tail recursive.)
4. Is there example code available which can give more insight into
iterators and their semantics?
William B. Clodius Phone: (505) 665-9370
Los Alamos Natl. Lab., NIS-2 FAX: (505) 667-3815
PO Box 1663, MS-C323 Group Off.: 505/667-3422 or 667-5127
Los Alamos, NM 87545 email: wclodius@lanl.gov